import PropTypes from 'prop-types'
import {View} from 'react-native'
const PPC = {}
PPC.page = {}
PPC.navbar = {}
PPC.pageCore = {}

PPC.pageCore.prototype = {
  ...View.prototype,
  navBar: PropTypes.any,
}

PPC.pageCore.defaultProps = {
  ...View.defaultProps,
  navBar: null,
}

PPC.page.prototype = {
  ...PPC.pageCore.prototype,
  ...PPC.navbar.prototype,
  hiddenNavBar: PropTypes.bool,
}

PPC.page.defaultProps = {
  ...PPC.pageCore.defaultProps,
  ...PPC.navbar.defaultProps,
  hiddenNavBar: false,
}

PPC.navbar.prototype = {
  ...View.prototype,
  navigation: PropTypes.any,
  title: PropTypes.string,
  titleView: PropTypes.any,

  isHiddenLeft: PropTypes.bool,
  leftView: PropTypes.any,
  onLeftPress: PropTypes.func,

  isHiddenRight: PropTypes.bool,
  rightView: PropTypes.any,
  rightText: PropTypes.string,
  onRightPress: PropTypes.func,

  backgroundColor: PropTypes.string,
}

PPC.navbar.defaultProps = {
  ...View.defaultProps,
  navigation: null,
  title: '',
  titleView: null,
  backgroundColor: 'blue',
  isHiddenLeft: true,
  isHiddenRight: true,
  rightView: null,
  rightText: '',
  onLeftPress: null,
  onRightPress: () => {},
}

export default PPC
